<script>
	export default {
		onLaunch: function() {
			console.log(`do------------onLaunch`)
			// //获取coid
			// let coid = this.getUrlParams().scene;
			// //如果url 中和缓存中都不包含   qrcode 则给赋值 默认值
			// if (coid != undefined && coid != '') {
			// 	uni.setStorageSync('coid', coid);
			// } else {
			// 	uni.setStorageSync('coid', "4");
			// }
		},
		onShow: function() {
		},
		onHide: function() {
		},
		methods: {
			getUrlParams() {
				var url = location.search; //获取url携带的参数
				var urlParams = new Object();
				if (url.indexOf('?') != -1) {
					var str = url.substr(1);
					var strs = str.split('&');
					for (var i = 0; i < strs.length; i++) {
						urlParams[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]);
					}
				}
				return urlParams;
			},
		}
	}
</script>

<style lang="scss">
	@import '~@/static/styles/app.scss';
	/*每个页面公共css */
	@import "./common/uni.css";
</style>
